#ifndef __XSIP_CALL_H__
#define __XSIP_CALL_H__
#include "xevent.h"

class XSIPDataReceiver;
class XSIPMessage;
class XSIPResponse;
class XSIPRequest;
class XSIPTransport;
class XSIP_API XSIPCall : public XSIPEvent {
public:
	XSIPCall();
	virtual ~XSIPCall();
	virtual void* getObject(const char* name) const;
	
	void setDataReceiver(XSIPDataReceiver* receiver);
	XSIPDataReceiver* getDataReceiver();

	virtual XSIPTransaction* createTransaction(XSIPRequest* request, XSIPTransport* transport);
	virtual XSIPResponse* createResponse(XSIPTransaction* transaction, XSIPRequest* request, int code);

	char* getCallId();
	void setCallId(char* id);

	virtual void onEvent(XSIPTransaction* transaction, int eventCode) = 0;
protected:
	XSIPTransaction* m_transaction;
	XSIPDataReceiver* m_receiver;
	char m_guid[64];
};

#endif